import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// 全局引入Element Plus 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// import axios from 'axios'

import api from "./api"

const app = createApp(App)

// 全局挂载axois
// app.config.globalProperties.$axios = axios
app.config.globalProperties.$api=api
app.config.globalProperties.$store = store;
app.use(store).use(router).use(ElementPlus, {
  locale: zhCn,
}).mount('#app')
app.provide("$store", store);
// app.use(store)
// 挂载图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

